namespace OneCaps.Core.Interfaces
{
    /// <summary>
    /// 道闸控制服务接口
    /// </summary>
    public interface IGateControlService
    {
        /// <summary>
        /// 打开道闸
        /// </summary>
        /// <param name="gateNumber">道闸编号</param>
        /// <returns>是否成功</returns>
        Task<bool> OpenGateAsync(string gateNumber);

        /// <summary>
        /// 关闭道闸
        /// </summary>
        /// <param name="gateNumber">道闸编号</param>
        /// <returns>是否成功</returns>
        Task<bool> CloseGateAsync(string gateNumber);

        /// <summary>
        /// 查询道闸状态
        /// </summary>
        /// <param name="gateNumber">道闸编号</param>
        /// <returns>道闸状态</returns>
        Task<GateStatus> GetGateStatusAsync(string gateNumber);
    }

    /// <summary>
    /// 道闸状态
    /// </summary>
    public enum GateStatus
    {
        Unknown = 0,
        Open = 1,
        Closed = 2,
        Fault = 3,
        Opening = 4,
        Closing = 5
    }
} 